# Maintainer: M Hickford <mirth.hickford@gmail.com>
pkgname=git-credential-azure
pkgver=0.2.3
pkgrel=7
pkgdesc="Git credential helper that authenticates to Azure Repos (dev.azure.com)"
url="https://github.com/hickford/git-credential-azure"
arch="all"
license="Apache-2.0"
makedepends="go"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/hickford/git-credential-azure/archive/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v
}

check() {
	go test ./...
}

package() {
	install -Dm755 git-credential-azure -t "$pkgdir"/usr/bin/
	install -Dm0644 git-credential-azure.1 -t "$pkgdir"/usr/share/man/man1/
}

sha512sums="
cfed72e9579ef72f74e4645bc93d52715f960c66a20a8bd30c73fcf025c50e5612c512252c9f87cd0737d24fa621ad7972f4693927773fedb61a92d07d92c830  git-credential-azure-0.2.3.tar.gz
"
